home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Games / MAME / src / drivers / yamato.c < prev    next >
C/C++ Source or Header  |  2000-05-04  |  16KB  |  474 lines

  1. /*
  2.  
  3. TODO:
  4. - This runs on Crazy Climber hardware, should be merged with that driver.
  5. - Two ROMs are not used, I don't know what they are.
  6. - I'm only using the bottom half of the big sprite char ROM - there must
  7.   be a way for the game to address both
  8.  
  9. */
  10.  
  11.  
  12. #include "driver.h"
  13. #include "vidhrdw/generic.h"
  14.  
  15. /* in machine/segacrpt.c */
  16. void yamato_decode(void);
  17.  
  18.  
  19. extern unsigned char *cclimber_bsvideoram;
  20. extern size_t cclimber_bsvideoram_size;
  21. extern unsigned char *cclimber_bigspriteram;
  22. extern unsigned char *cclimber_column_scroll;
  23. WRITE_HANDLER( cclimber_flipscreen_w );
  24. WRITE_HANDLER( cclimber_colorram_w );
  25. WRITE_HANDLER( cclimber_bigsprite_videoram_w );
  26. void cclimber_vh_convert_color_prom(unsigned char *palette, unsigned short *colortable,const unsigned char *color_prom);
  27. int cclimber_vh_start(void);
  28. void cclimber_vh_stop(void);
  29. void cclimber_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh);
  30.  
  31.  
  32. void yamato_vh_convert_color_prom(unsigned char *palette, unsigned short *colortable,const unsigned char *color_prom)
  33. {
  34.     int i;
  35.     #define TOTAL_COLORS(gfxn) (Machine->gfx[gfxn]->total_colors * Machine->gfx[gfxn]->color_granularity)
  36.     #define COLOR(gfxn,offs) (colortable[Machine->drv->gfxdecodeinfo[gfxn].color_codes_start + (offs)])
  37.  
  38.  
  39.     /* chars - 12 bits RGB */
  40.     for (i = 0;i < 64;i++)
  41.     {
  42.         int bit0,bit1,bit2,bit3;
  43.  
  44.  
  45.         /* red component */
  46.         bit0 = (color_prom[0] >> 0) & 0x01;
  47.         bit1 = (color_prom[0] >> 1) & 0x01;
  48.         bit2 = (color_prom[0] >> 2) & 0x01;
  49.         bit3 = (color_prom[0] >> 3) & 0x01;
  50.         *(palette++) = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
  51.         /* green component */
  52.         bit0 = (color_prom[0] >> 4) & 0x01;
  53.         bit1 = (color_prom[0] >> 5) & 0x01;
  54.         bit2 = (color_prom[0] >> 6) & 0x01;
  55.         bit3 = (color_prom[0] >> 7) & 0x01;
  56.         *(palette++) = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
  57.         /* blue component */
  58.         bit0 = (color_prom[64] >> 0) & 0x01;
  59.         bit1 = (color_prom[64] >> 1) & 0x01;
  60.         bit2 = (color_prom[64] >> 2) & 0x01;
  61.         bit3 = (color_prom[64] >> 3) & 0x01;
  62.         *(palette++) = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
  63.  
  64.         color_prom++;
  65.     }
  66.     color_prom += 64;
  67.  
  68.     /* big sprite - 8 bits RGB */
  69.     for (i = 0;i < 32;i++)
  70.     {
  71.         int bit0,bit1,bit2;
  72.  
  73.  
  74.         /* red component */
  75.         bit0 = (*color_prom >> 0) & 0x01;
  76.         bit1 = (*color_prom >> 1) & 0x01;
  77.         bit2 = (*color_prom >> 2) & 0x01;
  78.         *(palette++) = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
  79.         /* green component */
  80.         bit0 = (*color_prom >> 3) & 0x01;
  81.         bit1 = (*color_prom >> 4) & 0x01;
  82.         bit2 = (*color_prom >> 5) & 0x01;
  83.         *(palette++) = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
  84.         /* blue component */
  85.         bit0 = 0;
  86.         bit1 = (*color_prom >> 6) & 0x01;
  87.         bit2 = (*color_prom >> 7) & 0x01;
  88.         *(palette++) = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
  89.  
  90.         color_prom++;
  91.     }
  92.  
  93.  
  94.     /* character and sprite lookup table */
  95.     /* they use colors 0-63 */
  96.     for (i = 0;i < TOTAL_COLORS(0);i++)
  97.     {
  98.         /* pen 0 always uses color 0 (background in River Patrol and Silver Land) */
  99.         if (i % 4 == 0) COLOR(0,i) = 0;
  100.         else COLOR(0,i) = i;
  101.     }
  102.  
  103.     /* big sprite lookup table */
  104.     /* it uses colors 64-95 */
  105.     for (i = 0;i < TOTAL_COLORS(2);i++)
  106.     {
  107.         if (i % 4 == 0) COLOR(2,i) = 0;
  108.         else COLOR(2,i) = i + 64;
  109.     }
  110. }
  111.  
  112.  
  113.  
  114.  
  115. static int p0,p1;
  116.  
  117. static WRITE_HANDLER( p0_w )
  118. {
  119.     p0 = data;
  120. }
  121. static WRITE_HANDLER( p1_w )
  122. {
  123.     p1 = data;
  124. }
  125. static READ_HANDLER( p0_r )
  126. {
  127.     return p0;
  128. }
  129. static READ_HANDLER( p1_r )
  130. {
  131.     return p1;
  132. }
  133.  
  134. static struct MemoryReadAddress yamato_readmem[] =
  135. {
  136.     { 0x0000, 0x5fff, MRA_ROM },
  137.     { 0x6000, 0x67ff, MRA_RAM },
  138.     { 0x7000, 0x7fff, MRA_ROM },
  139.     { 0x8800, 0x8bff, MRA_RAM },
  140.     { 0x9000, 0x93ff, MRA_RAM },    /* video RAM */
  141.     { 0x9800, 0x9bff, MRA_RAM },    /* column scroll registers */
  142.     { 0x9c00, 0x9fff, MRA_RAM },    /* color RAM */
  143.     { 0xa000, 0xa000, input_port_0_r },     /* IN0 */
  144.     { 0xa800, 0xa800, input_port_1_r },     /* IN1 */
  145.     { 0xb000, 0xb000, input_port_2_r },     /* DSW */
  146.     { 0xb800, 0xb800, input_port_3_r },     /* IN2 */
  147.     { 0xba00, 0xba00, input_port_4_r },     /* IN3 (maybe a mirror of b800) */
  148.     { -1 }    /* end of table */
  149. };
  150.  
  151. static struct MemoryWriteAddress yamato_writemem[] =
  152. {
  153.     { 0x0000, 0x5fff, MWA_ROM },
  154.     { 0x6000, 0x67ff, MWA_RAM },
  155.     { 0x7000, 0x7fff, MWA_ROM },
  156.     { 0x8800, 0x88ff, cclimber_bigsprite_videoram_w, &cclimber_bsvideoram, &cclimber_bsvideoram_size },
  157.     { 0x8900, 0x8bff, MWA_RAM },  /* not used, but initialized */
  158.     { 0x9000, 0x93ff, videoram_w, &videoram, &videoram_size },
  159. //{ 0x9400, 0x97ff, videoram_w }, /* mirror address, used by Crazy Climber to draw windows */
  160.     /* 9800-9bff and 9c00-9fff share the same RAM, interleaved */
  161.     /* (9800-981f for scroll, 9c20-9c3f for color RAM, and so on) */
  162.     { 0x9800, 0x981f, MWA_RAM, &cclimber_column_scroll },
  163.     { 0x9880, 0x989f, MWA_RAM, &spriteram, &spriteram_size },
  164.     { 0x98dc, 0x98df, MWA_RAM, &cclimber_bigspriteram },
  165.     { 0x9800, 0x9bff, MWA_RAM },  /* not used, but initialized */
  166.     { 0x9c00, 0x9fff, cclimber_colorram_w, &colorram },
  167.     { 0xa000, 0xa000, interrupt_enable_w },
  168.     { 0xa001, 0xa002, cclimber_flipscreen_w },
  169. //{ 0xa004, 0xa004, cclimber_sample_trigger_w },
  170. //{ 0xa800, 0xa800, cclimber_sample_rate_w },
  171. //{ 0xb000, 0xb000, cclimber_sample_volume_w },
  172.     { -1 }    /* end of table */
  173. };
  174.  
  175. static struct IOReadPort yamato_readport[] =
  176. {
  177.     { -1 }    /* end of table */
  178. };
  179.  
  180. static struct IOWritePort yamato_writeport[] =
  181. {
  182.     { 0x00, 0x00, p0_w },    /* ??? */
  183.     { 0x01, 0x01, p1_w },    /* ??? */
  184.     { -1 }    /* end of table */
  185. };
  186.  
  187. static struct MemoryReadAddress yamato_sound_readmem[] =
  188. {
  189.     { 0x0000, 0x07ff, MRA_ROM },
  190.     { 0x5000, 0x53ff, MRA_RAM },
  191.     { -1 }    /* end of table */
  192. };
  193.  
  194. static struct MemoryWriteAddress yamato_sound_writemem[] =
  195. {
  196.     { 0x0000, 0x07ff, MWA_ROM },
  197.     { 0x5000, 0x53ff, MWA_RAM },
  198.     { -1 }    /* end of table */
  199. };
  200.  
  201. static struct IOReadPort yamato_sound_readport[] =
  202. {
  203.     { 0x04, 0x04, p0_r },    /* ??? */
  204.     { 0x08, 0x08, p1_r },    /* ??? */
  205.     { -1 }    /* end of table */
  206. };
  207.  
  208. static struct IOWritePort yamato_sound_writeport[] =
  209. {
  210.     { 0x00, 0x00, AY8910_control_port_0_w },
  211.     { 0x01, 0x01, AY8910_write_port_0_w },
  212.     { 0x02, 0x02, AY8910_control_port_1_w },
  213.     { 0x03, 0x03, AY8910_write_port_1_w },
  214.     { -1 }    /* end of table */
  215. };
  216.  
  217.  
  218.  
  219. INPUT_PORTS_START( yamato )
  220.     PORT_START      /* IN0 */
  221.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  222.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  223.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 )
  224.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON2 )
  225.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP | IPF_8WAY )
  226.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN | IPF_8WAY )
  227.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_8WAY )
  228.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_8WAY )
  229.  
  230.     PORT_START      /* IN1 */
  231.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  232.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  233.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_COCKTAIL )
  234.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON2 | IPF_COCKTAIL )
  235.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP | IPF_8WAY | IPF_COCKTAIL )
  236.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN | IPF_8WAY | IPF_COCKTAIL )
  237.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_COCKTAIL )
  238.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_COCKTAIL )
  239.  
  240.     PORT_START      /* DSW */
  241.     PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
  242.     PORT_DIPSETTING(    0x00, "3" )
  243.     PORT_DIPSETTING(    0x01, "4" )
  244.     PORT_DIPSETTING(    0x02, "5" )
  245.     PORT_DIPSETTING(    0x03, "6" )
  246.     PORT_DIPNAME( 0x1c, 0x00, DEF_STR( Coin_A ) )
  247.     PORT_DIPSETTING(    0x0c, DEF_STR( 4C_1C ) )
  248.     PORT_DIPSETTING(    0x08, DEF_STR( 3C_1C ) )
  249.     PORT_DIPSETTING(    0x04, DEF_STR( 2C_1C ) )
  250.     PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
  251.     PORT_DIPSETTING(    0x18, DEF_STR( 2C_3C ) )
  252.     PORT_DIPSETTING(    0x10, DEF_STR( 1C_2C ) )
  253.     PORT_DIPSETTING(    0x14, DEF_STR( 1C_3C ) )
  254.     PORT_DIPSETTING(    0x1c, DEF_STR( Free_Play ) )
  255.     PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) )
  256.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  257.     PORT_DIPSETTING(    0x20, DEF_STR( On ) )
  258.     PORT_DIPNAME( 0x40, 0x00, "Speed" )
  259.     PORT_DIPSETTING(    0x00, "Slow" )
  260.     PORT_DIPSETTING(    0x40, "Fast" )
  261.     PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) )
  262.     PORT_DIPSETTING(    0x80, DEF_STR( Upright ) )
  263.     PORT_DIPSETTING(    0x00, DEF_STR( Cocktail ) )
  264.  
  265.     PORT_START      /* IN2 */
  266.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN2 )    /* set 1 only */
  267.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN1 )
  268.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  269.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  270.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN3 )    /* set 1 only */
  271.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  272.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  273.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  274.  
  275.     PORT_START      /* IN3 */
  276.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  277.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  278.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
  279.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 )
  280.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  281.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  282.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  283.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  284. INPUT_PORTS_END
  285.  
  286.  
  287.  
  288. static struct GfxLayout charlayout =
  289. {
  290.     8,8,    /* 8*8 characters */
  291.     512,    /* 512 characters (256 in Crazy Climber) */
  292.     2,      /* 2 bits per pixel */
  293.     { 0, 512*8*8 }, /* the two bitplanes are separated */
  294.     { 0, 1, 2, 3, 4, 5, 6, 7 },     /* pretty straightforward layout */
  295.     { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
  296.     8*8     /* every char takes 8 consecutive bytes */
  297. };
  298. static struct GfxLayout bscharlayout =
  299. {
  300.     8,8,    /* 8*8 characters */
  301.     512,//256,    /* 256 characters */
  302.     2,      /* 2 bits per pixel */
  303.     { 0, 512*8*8 }, /* the bitplanes are separated */
  304.     { 0, 1, 2, 3, 4, 5, 6, 7 },     /* pretty straightforward layout */
  305.     { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
  306.     8*8     /* every char takes 8 consecutive bytes */
  307. };
  308. static struct GfxLayout spritelayout =
  309. {
  310.     16,16,  /* 16*16 sprites */
  311.     128,    /* 128 sprites (64 in Crazy Climber) */
  312.     2,      /* 2 bits per pixel */
  313.     { 0, 128*16*16 },       /* the bitplanes are separated */
  314.     { 0, 1, 2, 3, 4, 5, 6, 7,       /* pretty straightforward layout */
  315.             8*8+0, 8*8+1, 8*8+2, 8*8+3, 8*8+4, 8*8+5, 8*8+6, 8*8+7 },
  316.     { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8,
  317.             16*8, 17*8, 18*8, 19*8, 20*8, 21*8, 22*8, 23*8 },
  318.     32*8    /* every sprite takes 32 consecutive bytes */
  319. };
  320.  
  321. static struct GfxDecodeInfo gfxdecodeinfo[] =
  322. {
  323.     { REGION_GFX1, 0x0000, &charlayout,      0, 16 }, /* char set #1 */
  324.     { REGION_GFX1, 0x2000, &charlayout,      0, 16 }, /* char set #2 */
  325.     { REGION_GFX2, 0x0000, &bscharlayout, 16*4,  8 }, /* big sprite char set */
  326.     { REGION_GFX1, 0x0000, &spritelayout,    0, 16 }, /* sprite set #1 */
  327.     { REGION_GFX1, 0x2000, &spritelayout,    0, 16 }, /* sprite set #2 */
  328.     { -1 } /* end of array */
  329. };
  330.  
  331.  
  332.  
  333. static struct AY8910interface yamato_ay8910_interface =
  334. {
  335.     2,      /* 2 chips */
  336.     1536000,    /* 1.536 MHz??? */
  337.     { 25, 25 },
  338.     { 0 },
  339.     { 0 },
  340.     { 0 },
  341.     { 0 }
  342. };
  343.  
  344.  
  345.  
  346. static struct MachineDriver machine_driver_yamato =
  347. {
  348.     /* basic machine hardware */
  349.     {
  350.         {
  351.             CPU_Z80,
  352.             3072000,    /* 3.072 MHz ? */
  353.             yamato_readmem,yamato_writemem,yamato_readport,yamato_writeport,
  354.             nmi_interrupt,1
  355.         },
  356.         {
  357.             CPU_Z80 | CPU_AUDIO_CPU,
  358.             3072000,    /* 3.072 Mhz ? */
  359.             yamato_sound_readmem,yamato_sound_writemem,yamato_sound_readport,yamato_sound_writeport,
  360.             ignore_interrupt,0
  361.         }
  362.     },
  363.     60, DEFAULT_60HZ_VBLANK_DURATION,    /* frames per second, vblank duration */
  364.     1,    /* 1 CPU slice per frame - interleaving is forced when a sound command is written */
  365.     0,
  366.  
  367.     /* video hardware */
  368.     32*8, 32*8, { 0*8, 32*8-1, 2*8, 30*8-1 },
  369.     gfxdecodeinfo,
  370.     96,16*4+8*4,
  371.     yamato_vh_convert_color_prom,
  372.  
  373.     VIDEO_TYPE_RASTER,
  374.     0,
  375.     cclimber_vh_start,
  376.     cclimber_vh_stop,
  377.     cclimber_vh_screenrefresh,
  378.  
  379.     /* sound hardware */
  380.     0,0,0,0,
  381.     {
  382.         {
  383.             SOUND_AY8910,
  384.             &yamato_ay8910_interface
  385.         }
  386.     }
  387. };
  388.  
  389.  
  390.  
  391. ROM_START( yamato )
  392.     ROM_REGION( 2*0x10000, REGION_CPU1 )    /* 64k for code + 64k for decrypted opcodes */
  393.     ROM_LOAD( "2.5de",        0x0000, 0x2000, 0x20895096 )
  394.     ROM_LOAD( "3.5f",         0x2000, 0x2000, 0x57a696f9 )
  395.     ROM_LOAD( "4.5jh",        0x4000, 0x2000, 0x59a468e8 )
  396.     /* hole at 6000-6fff */
  397.     ROM_LOAD( "11.5a",        0x7000, 0x1000, 0x35987485 )
  398.  
  399.     /* I don't know what the following ROMs are! */
  400.     ROM_LOAD( "5.5lm",        0xf000, 0x1000, 0x7761ad24 )    /* ?? */
  401.     ROM_LOAD( "6.5n",         0xf000, 0x1000, 0xda48444c )    /* ?? */
  402.  
  403.     ROM_REGION( 0x10000, REGION_CPU2 )    /* 64k for sound cpu */
  404.     ROM_LOAD( "1.5v",         0x0000, 0x0800, 0x3aad9e3c )
  405.  
  406.     ROM_REGION( 0x4000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  407.     ROM_LOAD( "10.11k",       0x0000, 0x1000, 0x161121f5 )
  408.     ROM_CONTINUE(             0x2000, 0x1000 )
  409.     ROM_LOAD( "9.11h",        0x1000, 0x1000, 0x56e84cc4 )
  410.     ROM_CONTINUE(             0x3000, 0x1000 )
  411.  
  412.     ROM_REGION( 0x2000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  413.     /* TODO: I'm swapping the two halves of the ROMs to use only the bottom */
  414.     /* 256 chars. There must be a way for the game to address both halves */
  415.     ROM_LOAD( "8.11c",        0x0800, 0x0800, 0x28024d9a )
  416.     ROM_CONTINUE(             0x0000, 0x0800 )
  417.     ROM_LOAD( "7.11a",        0x1800, 0x0800, 0x4a179790 )
  418.     ROM_CONTINUE(             0x1000, 0x0800 )
  419.  
  420.     ROM_REGION( 0x00a0, REGION_PROMS )
  421.     ROM_LOAD( "1.bpr",        0x0000, 0x0020, 0xef2053ab )
  422.     ROM_LOAD( "2.bpr",        0x0020, 0x0020, 0x2281d39f )
  423.     ROM_LOAD( "3.bpr",        0x0040, 0x0020, 0x9e6341e3 )
  424.     ROM_LOAD( "4.bpr",        0x0060, 0x0020, 0x1c97dc0b )
  425.     ROM_LOAD( "5.bpr",        0x0080, 0x0020, 0xedd6c05f )
  426. ROM_END
  427.  
  428. ROM_START( yamato2 )
  429.     ROM_REGION( 2*0x10000, REGION_CPU1 )    /* 64k for code + 64k for decrypted opcodes */
  430.     ROM_LOAD( "2-2.5de",      0x0000, 0x2000, 0x93da1d52 )
  431.     ROM_LOAD( "3-2.5f",       0x2000, 0x2000, 0x31e73821 )
  432.     ROM_LOAD( "4-2.5jh",      0x4000, 0x2000, 0xfd7bcfc3 )
  433.     /* hole at 6000-6fff */
  434.     /* 7000-7fff not present here */
  435.  
  436.     /* I don't know what the following ROMs are! */
  437.     ROM_LOAD( "5.5lm",        0xf000, 0x1000, 0x7761ad24 )    /* ?? */
  438.     ROM_LOAD( "6.5n",         0xf000, 0x1000, 0xda48444c )    /* ?? */
  439.  
  440.     ROM_REGION( 0x10000, REGION_CPU2 )    /* 64k for sound cpu */
  441.     ROM_LOAD( "1.5v",         0x0000, 0x0800, 0x3aad9e3c )
  442.  
  443.     ROM_REGION( 0x4000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  444.     ROM_LOAD( "10.11k",       0x0000, 0x1000, 0x161121f5 )
  445.     ROM_CONTINUE(             0x2000, 0x1000 )
  446.     ROM_LOAD( "9.11h",        0x1000, 0x1000, 0x56e84cc4 )
  447.     ROM_CONTINUE(             0x3000, 0x1000 )
  448.  
  449.     ROM_REGION( 0x2000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  450.     /* TODO: I'm swapping the two halves of the ROMs to use only the bottom */
  451.     /* 256 chars. There must be a way for the game to address both halves */
  452.     ROM_LOAD( "8.11c",        0x0800, 0x0800, 0x28024d9a )
  453.     ROM_CONTINUE(             0x0000, 0x0800 )
  454.     ROM_LOAD( "7.11a",        0x1800, 0x0800, 0x4a179790 )
  455.     ROM_CONTINUE(             0x1000, 0x0800 )
  456.  
  457.     ROM_REGION( 0x00a0, REGION_PROMS )
  458.     ROM_LOAD( "1.bpr",        0x0000, 0x0020, 0xef2053ab )
  459.     ROM_LOAD( "2.bpr",        0x0020, 0x0020, 0x2281d39f )
  460.     ROM_LOAD( "3.bpr",        0x0040, 0x0020, 0x9e6341e3 )
  461.     ROM_LOAD( "4.bpr",        0x0060, 0x0020, 0x1c97dc0b )
  462.     ROM_LOAD( "5.bpr",        0x0080, 0x0020, 0xedd6c05f )
  463. ROM_END
  464.  
  465.  
  466. static void init_yamato(void)
  467. {
  468.     yamato_decode();
  469. }
  470.  
  471.  
  472. GAME( 1983, yamato,  0,      yamato, yamato, yamato, ROT90, "Sega", "Yamato (set 1)" )
  473. GAME( 1983, yamato2, yamato, yamato, yamato, yamato, ROT90, "Sega", "Yamato (set 2)" )
  474.